import req from '@/utils/req/axios'
import urls from '@/utils/constants/urls'

export const showOverflowTooltip = {
  'show-overflow-tooltip': true,
}
export const resourceTypeList = [
  {
    id: '1',
    name: '页面',
  },
  {
    id: '2',
    name: '按钮',
  },
  {
    id: '3',
    name: '隐藏菜单',
  },
]
export const listBySetCodeApi = (setCode) => ({
  api: {
    async request() {
      const res = await req.post(urls.v1.system.valueSet.listBySetCode, {
        setCode,
      })
      return res.data.map((item) => ({id: item.code, name: item.name}))
    },
  },
})
